package io;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;

public class TestCp {

	public static void main(String[] args) throws Exception{
		InputStream in=new FileInputStream("aa.jpeg");
		OutputStream out=new FileOutputStream("bb.jpeg");
		byte[] buf=new byte[16];
		int m=0;
		//EOF
		while((m=in.read(buf))!=-1) {
			out.write(buf,0,m);
		}
		in.close();
		out.close();

	}

}
